﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RFW.Weather
{
	public static class ExtensionMethods
	{
		public static decimal ToDecimal(this String str)
		{
			decimal output = 0M;
			decimal.TryParse(str, out output);

			return output;
		}

		public static string URLDecode(this String str)
		{
			return System.Web.HttpUtility.UrlDecode(str);
		}

		public static DateTime ToDateTime(this String str)
		{
			DateTime output = new DateTime(0);
			DateTime.TryParse(str, out output);

			return output;
		}
	}
}
